﻿function T(n) { $("#news3").css("font-size", n + "px"); }

function CopyURL() {
    var myHerf = top.location.href;
    var title = document.title;
    if (window.clipboardData) {
        var tempCurLink = title + "\n" + myHerf;
        var ok = window.clipboardData.setData("Text", tempCurLink);
        if (ok) alert("按Ctrl + V ,粘贴到QQ上发给你的好友们吧 ！");
    } else { alert("对不起，目前此功能只支持IE，请直接复制地址栏的地址！"); }
}

$(document).ready(function () {
    var title = document.title, url = window.location.href;
    $('#shareBtn_renren').click(function () {
        var shareUrl = 'http://share.xiaonei.com/share/buttonshare.do?';
        shareUrl += 'link=' + url;
        shareUrl += '&title=' + encodeURIComponent(title);
        window.open(shareUrl);
    });
    $('#shareBtn_163weibo').click(function () {
        window.open('http://t.163.com/article/user/checkLogin.do?source=' + encodeURIComponent('网易图片库') + '&info=' + encodeURIComponent(title) + ' ' + encodeURIComponent(url) + '&images=' + $('#thumb > li.nph_list_active img').attr('src') + ',' + $('#photo').attr('src') + '&' + new Date().getTime(), '_blank', 'width=510,height=300');
    });
    $('#shareBtn_kaixin').click(function () {
        var shareUrl = 'http://www.kaixin001.com/~repaste/repaste.php?';
        shareUrl += 'rurl=' + escape(url);
        shareUrl += '&rtitle=' + escape(title);
        window.open(shareUrl);
    });
    $('#shareBtn_douban').click(function () {
        var shareUrl = 'http://www.douban.com/recommend/?';
        shareUrl += 'url=' + encodeURIComponent(url);
        shareUrl += '&title=' + encodeURIComponent(title);
        window.open(shareUrl);
    });
    $('#shareBtn_qq').click(function () {
        var shareUrl = 'http://share.v.t.qq.com/index.php?c=share&a=index&';
        var bRY = 'fc06c72646946af85d8971fd3a007596';
        shareUrl += 'url=' + encodeURIComponent(url);
        shareUrl += '&appkey=' + bRY;
        shareUrl += '&title=' + encodeURIComponent(title);
        window.open(shareUrl, '_blank', 'width=700,height=680,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,location=yes,resizable=no,status=no');
    });
    $('#shareBtn_sina').click(function () {
        var shareUrl = 'http://v.t.sina.com.cn/share/share.php?';
        shareUrl += 'url=' + encodeURIComponent(url);
        shareUrl += '&title=' + encodeURIComponent(title);
        shareUrl += '&pic=' + $('#photo').attr('src') + '&searchPic=false';
        window.open(shareUrl, '_blank', 'width=450,height=400');
    });
});
